package com.digicom.common.exception;

/**
 * 业务异常类
 */
public class ServiceException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /** 错误码 */
    private String code;

    /** 错误提示 */
    private String message;

    /**
     * 构造函数
     * 
     * @param message 错误提示
     */
    public ServiceException(String message) {
        this.message = message;
    }

    /**
     * 构造函数
     * 
     * @param code 错误码
     * @param message 错误提示
     */
    public ServiceException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
} 